package com.szrt.cll.test.student.entity;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.context.annotation.Scope;

@Scope("prototype")
@Table(name="db1607_student_t")
public class StudentEntity {

	/*
	 * CREATE TABLE `db1607_student_t` (
	  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '学生ID主键',
	  `NAME` varchar(64) DEFAULT NULL COMMENT '学生姓名',
	  `AGE` int(11) DEFAULT NULL COMMENT '学生年龄',
	  `PHONE` varchar(12) DEFAULT NULL COMMENT '手机号码',
	  `CLASS_ID` int(11) DEFAULT NULL COMMENT '外键班级ID',
	  PRIMARY KEY (`ID`)
	) ENGINE=InnoDB DEFAULT CHARSET=utf8;
	 */
	@Id
	private Integer id;
	private String name;
	private Integer age;
	private String phone;
	private Integer classId;
	
	//外来字段
	@Transient
	private String schoolName;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public Integer getClassId() {
		return classId;
	}
	public void setClassId(Integer classId) {
		this.classId = classId;
	}
	public String getSchoolName() {
		return schoolName;
	}
	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}
}
